<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行级元素&块级元素转换</title>
    <link rel="stylesheet" href="尉迟鹤泽/iconfont.css">
    <style>
       body {
            font-family: "Open Sans", sans-serif;
            
        }

        #wrapper {
            background-color: #212529;
            width: 300px;
            color: #fff;
        }
        #nav {
            color: #fff;
            font-size: 16px;
            padding-left: 10px;
        }

        a {
            display: block;
            text-decoration: none;
            color: #a8a9b4;
            height: 50px;
            line-height: 50px; /*行高=height时，单行文本可以在元素中居中*/
        }

        .iconfont {
            font-size: 20px;
            font-weight: 700;
        }

        a:hover {
            color: #fff;
        }

        a:hover .iconfont {
            color: #149ddd;
        }

        
    </style>
</head>
<body>
    <div id="wrapper">
        <div id="nav">
            <a href="#">
                <i class="iconfont icon-home"></i>Home
            </a>
            <a href="#">
                <i class="iconfont icon-about"></i>About 
            </a>
            <a href="#">
                <i class="iconfont icon-resume"></i>Resume
            </a>
            <a href="#">
                <i class="iconfont icon-portfolio"></i>Portfolio
            </a>
            <a href="#">
                <i class="iconfont icon-services"></i>Services
            </a>
        </div>
    </div>
</body>
</html>